Failure Tabled Constraint Logic Programming by Interpolation published in Theory and Practice of Logic Programming
نویسندگان
چکیده
The problem of verifying safety properties consists of proving that an unsafe configuration or error is not reachable from an initial configuration considering all possible program executions. clp has been shown to be a successful model for performing this task (see for example Jaffar et al. (2009) and Angelis et al. (2012)). The program P can be translated into an equivalent clp program P ′ such that the error is unreachable if and only if the derivation tree of P ′ does not contain any successful derivation. If the derivation tree is finite and the safety property can be expressed, for example, on real numbers then any clp system can prove the absence of errors. However, programs often contain unbounded loops, and therefore, the main challenge lies in discovering loop invariants that can still prove the unreachability of the error configurations. Another problem for clp systems is that sometimes the safety property may require reasoning about other theories different from real or rational linear arithmetic. In this appendix, we show several examples (Figures 1 and 2) taken from the software verification literature which are commonly considered to be challenging for automatic verifiers. We have translated the programs into clp manually in such way that the original program is safe iff the clp model of the translated program is empty. The details of the translation are beyond of the scope of this paper and we refer to, for example, Delzanno and Podelski (2001) and Jaffar et al. (2005) for a formal description. We also show the inductive invariant required in each case to prove program is safe. The only program that cannot be verified by our method is t1.c. Note that a safe inductive invariant is Y ≥ 0 ∧ X ≥ Y. From error/4 we can trivially infer the interpolant X ≥ Y but unfortunately we cannot infer the other required invariant Y ≥ 0 even though that clearly holds, since Y = 0 initially and then Y can only be incremented by one. This shortcoming is typical of methods that rely only on counterexample-driven verification with interpolation. However, abstract interpreters using intervals or octagons can easily infer the inductive invariant Y ≥ 0. Thus, verifiers that combine abstract interpretation with interpolation (Gulavani et al. 2008; Albarghouthi et al. 2012; Jaffar et al. 2012) can easily infer the required invariant Y ≥ 0. Note that all C variables are defined …
منابع مشابه
Failure tabled constraint logic programming by interpolation
We present a new execution strategy for constraint logic programs called Failure Tabled CLP. Similarly to Tabled CLP our strategy records certain derivations in order to prune further derivations. However, our method only learns from failed derivations. This allows us to compute interpolants rather than constraint projection for generation of reuse conditions. As a result, our technique can be ...
متن کاملTCHR: a framework for tabled CLP
Tabled Constraint Logic Programming is a powerful execution mechanism for dealing with Constraint Logic Programming without worrying about fixpoint computation. Various applications, e.g in the fields of program analysis and model checking, have been proposed. Unfortunately, a high-level system for developing new applications is lacking, and programmers are forced to resort to complicated ad ho...
متن کاملTabled Higher-Order Logic Programming
A logical framework is a general meta-language for specifying and implementing deductive systems, given by axioms and inference rules. Based on a higher-order logic programming interpretation, it supports executing logical systems and reasoning with and about them, thereby reducing the effort required for each particular logical system. In this thesis, we describe different techniques to improv...
متن کاملLogic Programming with Mode-directed Preferences
Preference logic programming (PLP) is an extension of constraint logic programming for declaratively specifying problems requiring optimization or comparison and selection among alternative solutions to a query. PLP essentially separates the programming of a problem itself from the criteria specification of its solution selection. In this paper we give a precise formalization for the syntax and...
متن کاملNurse rostering using fuzzy logic: A case study
In this paper, we used the fuzzy set theory for modeling flexible constraints and uncertain data in nurse scheduling problems and proposed a fuzzy linear model for nurse rostering problems. The developed model can produce rosters that satisfy hospital objectives, ward requirements and staff preferences by satisfying their requests as much as possible. Fuzzy sets are used for modeling demands of...
متن کاملConstraint Logic Programming for Local and Symbolic Model-Checking
We propose a model checking scheme for a semantically complete fragment of CTL by combining techniques from constraint logic programming, a restricted form of constructive negation and tabled resolution. Our approach is symbolic in that it encodes and manipulates sets of states using constraints; it supports local model checking using goal-directed computation enhanced by tabulation. The framew...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2013